#ifndef __MARS_GP_PLATFORM_H__
#define __MARS_GP_PLATFORM_H__

#include "MarsSharedPtr.h"
#include "MarsWeakPtr.h"
#include "MarsObject.h"
#include "MarsGPDevice.h"

using namespace Core;

namespace GP
{

class Platform : public Object, public RefCountObject
{
public:

public:
									Platform( PlatformVendor ePlatformVendor );
	virtual							~Platform();

	virtual void					InitDevice() = 0;

	bool							ContainDevice( DeviceType eDeviceType ) const;

	PlatformVendor					GetPlatformVendor() const;

protected:
	PlatformVendor					m_ePlatformVendor;

	typedef std::vector< DevicePtr >	DeviceVec;
	typedef DeviceVec::iterator			DeviceVecItr;
	typedef DeviceVec::const_iterator	DeviceVecConstItr;

	DeviceVec						m_vecDevices;
};

inline Platform::Platform( PlatformVendor ePlatfromVendor )
{
}

inline Platform::~Platform()
{
	m_vecDevices.clear();
}

inline PlatformVendor Platform::GetPlatformVendor() const
{
	return m_ePlatformVendor;
}

typedef SharedPtr< Platform >	PlatformPtr;
typedef WeakPtr< Platform >		PlatformRef;

} // end of namespace GP

#endif // endif #ifndef __MARS_GP_PLATFORM_H__